package com.g1.gzbooksingle.mapper;

import com.g1.gzbooksingle.model.DgWeekRecommand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
* <p>
    * 每周推荐表 Mapper 接口
    * </p>
*
* @author admin
* @since 2021-10-12
*/
    @Mapper
    public interface DgWeekRecommandMapper extends BaseMapper<DgWeekRecommand> {
    /**
     * 查询最新的一条每周推荐
     * @return DgWeekRecommand
     */
    @Select("SELECT id,books,create_time FROM dg_week_recommand ORDER BY create_time DESC LIMIT 0,1")
        DgWeekRecommand selectNewWeekRecommand();
    }
